// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import Vuex from 'vuex'
Vue.use(Vuex);


Vue.config.productionTip = false;
const store = new Vuex.Store({
  // 定义状态
  state: {
    songmess: '',
    songs:'',
    dmusic:'',
    songdata:'',
    loginsatat:'',
    musicthar:''
  },
   mutations: {
    increment (state,songmess) {
      state.songmess = songmess  
    },
     addsongs (state,s) {
      state.songs = s
    },
    playsongs(state,dmusic){
      state.dmusic = dmusic  
    },
    loginWin(state,songdata){
      state.songdata = songdata
      console.log(state.songdata)
    },
    Ostate(state,loginsatat){
      state.loginsatat = loginsatat
      console.log(loginsatat)
    },
    musicthar(state,musicthar){
      state.musicthar = musicthar //播放传送
    }
  }
})

Vue.prototype.$http = axios;


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})
